package com.dubbo.cp.provider.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.dubbo.cp.entity.UserEntity;



@Mapper
public interface UserMapper {
	@Select("SELECT * FROM user")
	List<UserEntity> getUserList();
	
    @Select("SELECT * FROM user WHERE id = #{id}")
    UserEntity findUserByUserid(@Param("id")int userid);
    
	
    @Select("SELECT * FROM user WHERE username = #{username}")
    UserEntity findUserByUsername(@Param("username")String username);
	
}
